package com.wordlearning.app.service;

import com.wordlearning.app.entity.Word;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;

public interface WordService {

    Word createWord(Word word); 
    List<Word> getAllWords(int page, int pageSize);
    Optional<Word> getWordById(Long id);
    Optional<Word> getWordByContent(String content);
    Word updateWord(Long id, Word word);
    void deleteWord(Long id);
    boolean existsByContent(String content);
    List<Word> searchWords(String keyword);

}